package gentle.controller;

import com.baomidou.mybatisplus.plugins.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import gentle.service.ICustomerService;
import gentle.entity.*;
import gentle.factory.*;

import java.text.ParseException;
import java.util.List;

import gentle.base.BaseController;
import org.springframework.web.bind.annotation.CrossOrigin;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;

/**
 * @author py
 * @Date 2019年4月19日23:15:54
 */
@Controller
@RequestMapping("/customer")
public class CustomerController extends BaseController {

    @Autowired
    ICustomerService customerService;

    //到店-患者信息列表加载数据
    @RequestMapping("/list")
    @ResponseBody
    public Object testrInfoList(SearchCustomerInfo info) {
        if (info.getAbbreviation() == null || info.getAbbreviation() == "" || info.getAbbreviation() == "null") {
            return null;
        } else {
            Page<CustomerInfo> page = new PageFactory<CustomerInfo>().defaultPage();
            try {
                info.setStartIndex(page.getSize() * (page.getCurrent() - 1));
                info.setLimitIndex(page.getSize());
                page.setCurrent(0);
                List<CustomerInfo> list = customerService.selectPageListByQueryGetMap(page, info);
                if (list.size() == 0) {
                    info.setStartIndex(0);
                    list = customerService.selectPageListByQueryGetMap(page, info);
                }
                page.setTotal(customerService.getQueryPagesCount(page, info));
                page.setRecords(list);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return super.packForBT(page);
        }
    }

    //患者信息列表统计
    @CrossOrigin
    @RequestMapping(value = "/total", method = RequestMethod.GET)
    @ResponseBody
    public List<ConsultantInfo> total(String startArrivalTime, String endArrivalTime, String oneChannelValue, String doctor,
                                      String twoChannelValue, String thrChannelValue, String fieldTc, String treatmentUnit,
                                      String sreach,String dealStatus, String oppStatus,String abbreviation) {
        return customerService.total(startArrivalTime, endArrivalTime, oneChannelValue, doctor,
                twoChannelValue, thrChannelValue, fieldTc, treatmentUnit,sreach, dealStatus, oppStatus,abbreviation);
    }

    //到店-短信群发列表加载数据
    @RequestMapping("/qfList")
    @ResponseBody
    public Object testrInfoqfList(SearchCustomerInfo info, HttpServletRequest request) {
        if (info.getAbbreviation() == null || info.getAbbreviation() == "" || info.getAbbreviation() == "null") {
            return null;
        } else {
            Page<CustomerInfo> page = new PageFactory<CustomerInfo>().defaultPage();
            try {
                info.setStartIndex(page.getSize() * (page.getCurrent() - 1));
                info.setLimitIndex(page.getSize());
                page.setCurrent(0);
                List<CustomerInfo> list = customerService.selectPageQfListByQueryGetMap(page, info);
                if (list.size() == 0) {
                    info.setStartIndex(0);
                    list = customerService.selectPageQfListByQueryGetMap(page, info);
                }
                page.setTotal(customerService.getQueryPagesQfCount(page, info));
                page.setRecords(list);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return super.packForBT(page);
        }
    }

    //患者信息列表 今日扫码统计
    @CrossOrigin
    @RequestMapping(value = "/scanCode", method = RequestMethod.GET)
    @ResponseBody
    public List<MembersUser> changeScanCode(String startUpdateTime1, String endUpdateTime1, String startUpdateTime2, String endUpdateTime2,
                                            String startAddTime1, String endAddTime1, String startAddTime2, String endAddTime2, String abbreviation) {
        return customerService.changeScanCode(startUpdateTime1, endUpdateTime1, startUpdateTime2, endUpdateTime2,
                startAddTime1, endAddTime1, startAddTime2, endAddTime2, abbreviation);
    }

    //此患者是否到过店
    @RequestMapping(value = "/getdcsByCustomerId", method = RequestMethod.POST)
    @ResponseBody
    public int getdcsByCustomerId(String id,String abbreviation) throws Exception {
        return customerService.getdcsByCustomerId(id,abbreviation);
    }

    // 查看会员是否存在
    @RequestMapping(value = "/getMemberStatus", method = RequestMethod.POST)
    @ResponseBody
    public int getMemberStatus(String reservationsId) throws Exception {
        return customerService.getMemberStatus(reservationsId);
    }

    // 复诊 复诊到店 /新建预约 / 预约视图再预约
    @RequestMapping(value = "/addCustomerFzs", method = RequestMethod.POST)
    @ResponseBody
    public MembersArriveInfo addCustomerFzs(String customerPhone, String projectData, String treatmentUnit, String fieldTc, String doctor,String remarks,
                                            String reservationsId, String isFz,String startTimeValue, String duration, String customerId,
                                            String abbreviation,String userName,String outpatientName,String userId) throws Exception {
        return customerService.addCustomerFzs(customerPhone, projectData, treatmentUnit,fieldTc, doctor, remarks, reservationsId, isFz,
                startTimeValue, duration, customerId, abbreviation,userName,outpatientName,userId);
    }

    // 查询 看诊项目集合
    @RequestMapping(value = "/getListInfo", method = RequestMethod.POST)
    @ResponseBody
    public List<DiagnoseProjectInfo> getDiagnoseInfo(String projectCategory) throws Exception {
        return customerService.getDiagnoseInfo(projectCategory);
    }

    //获取医生当前的休息状态
    @RequestMapping(value = "/getDoctorStatus", method = RequestMethod.POST)
    @ResponseBody
    public String getDoctorStatus(String doctor, String value, String outpatientName) throws Exception {
        return customerService.getDoctorStatus(doctor,value,outpatientName);
    }

    // 重咨 重咨到店
    @RequestMapping(value = "/addNatureCustomerCZ", method = RequestMethod.POST)
    @ResponseBody
    public MembersArriveInfo addNatureCustomerCZ(String reservationsId, String customerName, String treatmentUnit,
                                                 String fieldTc, String remarks, String abbreviation, String outpatientName,String userName) throws ParseException {
        return customerService.addNatureCustomerCZ(reservationsId,customerName,treatmentUnit,fieldTc,remarks,abbreviation,outpatientName,userName);
    }

    // 修改个人信息
    @RequestMapping(value = "/updateCustomeInfoValue", method = RequestMethod.POST)
    @ResponseBody
    public int updateCustomeInfoValue(CustomerInfo info) {
        return customerService.updateCustomeInfoValue(info);
    }

    //未结帐记录
    @RequestMapping(value = "/unclosedRecords", method = RequestMethod.POST)
    @ResponseBody
    public List<PayServicedInfo> unclosedRecords(String reservationsId, String abbreviation, String areaAbbreviation) {
        List<PayServicedInfo> unclosedRecordsList = customerService.unclosedRecords(reservationsId,abbreviation,areaAbbreviation);
        return unclosedRecordsList;
    }

    //储值录入
    @RequestMapping(value = "/addCustomerErnest", method = RequestMethod.POST)
    @ResponseBody
    public int addCustomerErnest(String remarks, String customerId, String[] str, String mode, String reservationsId, String fieldTcValue,
                                 String abbreviation, String areaAbbreviation, String outpatientName,String userName,String sttleAccountsTime,String memberSwitch) {
        return customerService.addCustomerErnest(remarks, customerId, str, mode, reservationsId, fieldTcValue, abbreviation, areaAbbreviation,
                outpatientName, userName,sttleAccountsTime,memberSwitch);
    }

    //查询储值转让人
    @RequestMapping(value = "/getReferee", method = RequestMethod.POST)
    @ResponseBody
    public List<UserDto> getReferee(String name,String abbreviation) throws Exception {
        return customerService.getReferee(name,abbreviation);
    }

    // 积分录入 
    @RequestMapping(value = "/addCustomerScore", method = RequestMethod.POST)
    @ResponseBody
    public int addCustomerScore(String jfbalance, String remarks, String mode, String customerId, String reservationsId,
                                String abbreviation, String outpatientName,String userName,String proportional) {
        return customerService.addCustomerScore(jfbalance, remarks, mode, customerId, reservationsId, abbreviation, outpatientName, userName,proportional);
    }

    //积分兑换商品
    @RequestMapping(value = "/verificationCodeTwo", method = RequestMethod.POST)
    @ResponseBody
    public int verificationCodeTwo(String customerId, String productId,String abbreviation,String outpatientName,String userName) {
        return customerService.verificationCodeTwo(customerId,productId,abbreviation,outpatientName,userName);
    }

    // 返现操作
    @RequestMapping(value = "/updateReturnCashInfo", method = RequestMethod.POST)
    @ResponseBody
    public int updateReturnCashInfo(String jfbalance, String remarks, String mode, String customerId, String reservationsId,
                                    String abbreviation,String outpatientName,String userName) {
        return customerService.updateReturnCashInfo(jfbalance,remarks,mode,customerId,reservationsId,abbreviation,outpatientName,userName);
    }

    //种植牙俱乐部充值
    @RequestMapping(value = "/addOrthodonticsDeal", method = RequestMethod.POST)
    @ResponseBody
    public int addOrthodonticsDeal(String remarks, String customerId, String[] str, String mode, String fieldTcValue,
                                   String abbreviation, String outpatientName,String userName,String sttleAccountsTime) {
        return customerService.addOrthodonticsDeal(remarks, customerId, str, mode, fieldTcValue, abbreviation,outpatientName,userName,sttleAccountsTime);
    }

    // 积分变动记录
    @RequestMapping(value = "/getScoreDealList/{reservationsId}")
    @ResponseBody
    public List<ScoreDealInfo> getScoreDealList(@PathVariable String reservationsId) throws Exception {
        return customerService.getScoreDealList(reservationsId);
    }

    // 返现变动记录
    @RequestMapping(value = "/getreturnCashRecordList/{reservationsId}")
    @ResponseBody
    public List<ScoreDealInfo> getreturnCashRecordList(@PathVariable String reservationsId) throws Exception {
        return customerService.getreturnCashRecordList(reservationsId);
    }

    //判断渠道是市场的还是到店的
    @RequestMapping(value = "/isMarket", method = RequestMethod.POST)
    @ResponseBody
    public int isMarket(String oneChannel) throws Exception {
        return customerService.isMarket(oneChannel);
    }

    //判断客户是否充值,冲积分,是否已结账或是已开单
    @RequestMapping(value = "/is_void", method = RequestMethod.POST)
    @ResponseBody
    public CustomerInfo isVoid(String customerId,String abbreviation) throws Exception {
        return customerService.isVoid(customerId,abbreviation);
    }

    // 修改到店时间  通过客户ID 进行修改
    @RequestMapping(value = "/updateTime", method = RequestMethod.POST)
    @ResponseBody
    public int updateGetTime(String customerId, String updateTime,String abbreviation) {
        return customerService.updateGetTime(customerId,updateTime,abbreviation);
    }

    // 设置无龋齿卡
    @RequestMapping(value = "/updateChildrenCardOk", method = RequestMethod.POST)
    @ResponseBody
    public int updateChildrenCardOk(String reservationsId, String childrenCard, String abbreviation) {
        return customerService.updateChildrenCardOk(reservationsId,childrenCard,abbreviation);
    }

    // 修改个人信息
    @RequestMapping(value = "/update_CustomeInfoValue/{customerId}/{abbreviation}/{userId}/{userName}/{outpatientName}", method = RequestMethod.POST)
    @ResponseBody
    public int update_CustomeInfoValue(@Valid CustomerInfo info, @PathVariable String customerId, @PathVariable String abbreviation,
                                       @PathVariable String userId, @PathVariable String userName , @PathVariable String outpatientName) {
        return customerService.update_CustomeInfoValue(info,customerId,abbreviation,userId,userName,outpatientName);
    }

    //批量修改TC
    @RequestMapping(value = "/batchChoiceTc", method = RequestMethod.POST)
    @ResponseBody
    public int batchChoiceTc(String fieldTc, String tcName, String remarks,String abbreviation,String userName) {
        return customerService.batchChoiceTc(fieldTc,tcName,remarks,abbreviation,userName);
    }

    //修改媒介
    @RequestMapping(value = "/update_mediumValue", method = RequestMethod.POST)
    @ResponseBody
    public int update_mediumValue(String oneMedium2, String twoMedium2, String thrMedium2, String customerId, String abbreviation,String userName) {
        return customerService.update_mediumValue(oneMedium2,twoMedium2,thrMedium2,customerId,abbreviation,userName);
    }

    //修改医生
    @RequestMapping(value = "/choiceDoctor", method = RequestMethod.POST)
    @ResponseBody
    public int choiceDoctor(String customerId, String doctor, String remarks, String abbreviation) throws Exception {
        return customerService.choiceDoctor(customerId,doctor,remarks,abbreviation);
    }

    //修改TC
    @RequestMapping(value = "/choiceTc", method = RequestMethod.POST)
    @ResponseBody
    public int choiceTc(String customerId, String tcName, String remarks,String abbreviation,String userId,String userName,String outpatientName) throws Exception {
        return customerService.choiceTc(customerId,tcName,remarks,abbreviation,userId,userName,outpatientName);
    }


    //判定需修改科室等级
    @RequestMapping(value = "/treatmentUnitGrade", method = RequestMethod.POST)
    @ResponseBody
    public int treatmentUnitGrade(String initialization, String customerId,String treatmentUnitY, String areaAbbreviation) {
        return customerService.treatmentUnitGrade(initialization,customerId,treatmentUnitY,areaAbbreviation);
    }

    //提交修改科室 待审核
    @RequestMapping(value = "/update_TreatmentUnitValueOne", method = RequestMethod.POST)
    @ResponseBody
    public int update_TreatmentUnitValueOne(String initialization, String customerId, String remarks, String treatmentUnitY,
                                            String abbreviation,Integer auditOfDept,String userName,String outpatientName) {
        return customerService.update_TreatmentUnitValueOne(initialization,customerId,remarks,treatmentUnitY,abbreviation,auditOfDept,userName,outpatientName);
    }

    //修改的科室等级小于原科室的等级 直接修改
    @RequestMapping(value = "/update_TreatmentUnitValueTwo", method = RequestMethod.POST)
    @ResponseBody
    public int update_TreatmentUnitValueTwo(String initialization, String customerId,String abbreviation) {
        return customerService.update_TreatmentUnitValueTwo(initialization,customerId,abbreviation);
    }

    //修改电话 设置为主号
    @RequestMapping(value = "/setZphone", method = RequestMethod.POST)
    @ResponseBody
    public int setZphone(String customerPhone, String customerPhone2, String customerId,String abbreviation,String userName,String outpatientName) {
        return customerService.setZphone(customerPhone,customerPhone2,customerId,abbreviation,userName,outpatientName);
    }

    //添加电话
    @RequestMapping(value = "/addPhone", method = RequestMethod.POST)
    @ResponseBody
    public int addPhone(String customerPhone3, String customerId,String abbreviation,String userName,String outpatientName) {
        return customerService.addPhone(customerPhone3,customerId,abbreviation,userName,outpatientName);
    }

    //作废到店数据
    @RequestMapping(value = "/toVoid", method = RequestMethod.POST)
    @ResponseBody
    public int toVoid(String toVoidremarks, String customerId,String abbreviation,String userName,String outpatientName) throws Exception {
        return customerService.toVoid(toVoidremarks,customerId,abbreviation,userName,outpatientName);
    }

    //预约视图 修改看诊项目
    @RequestMapping(value = "/updAppointmentPayServiceOK", method = RequestMethod.POST)
    @ResponseBody
    public int updAppointmentPayServiceOK(String customerId,String projectData,String abbreviation,String outpatientName,String userName,String userId) throws Exception {
        return customerService.updAppointmentPayServiceOK(customerId, projectData,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 修改预约备注
    @RequestMapping(value = "/updateRemarksReservationOk", method = RequestMethod.POST)
    @ResponseBody
    public int updateRemarksReservationOk(String customerId, String remarksReservation,String abbreviation,String outpatientName,String userName,String userId) throws Exception {
        return customerService.updateRemarksReservationOk(customerId, remarksReservation,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 修改保存黄页编号 
    @RequestMapping(value = "/updateNumber", method = RequestMethod.POST)
    @ResponseBody
    public int updateNumber(String customerId, String yellowNumber,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.updateNumber(customerId, yellowNumber,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 查看改动日志
    @RequestMapping("/getUpdateLogList/{customerId}/{abbreviation}")
    @ResponseBody
    public Object getUpdateLogList(@PathVariable String customerId,@PathVariable String abbreviation, SearchCustomerReservationsUpdateLogInfo info) {
        Page<CustomerReservationsUpdateLogInfo> page = new PageFactory<CustomerReservationsUpdateLogInfo>().defaultPage();
        try {
            info.setCustomerId(customerId);
            info.setAbbreviation(abbreviation);
            info.setStartIndex(page.getSize() * (page.getCurrent() - 1));
            info.setLimitIndex(page.getSize());
            page.setCurrent(0);
            List<CustomerReservationsUpdateLogInfo> list = customerService.getLogList(page, info);
            if (list.size() == 0) {
                info.setStartIndex(0);
                list = customerService.getLogList(page, info);
            }
            page.setRecords(list);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return super.packForBT(page);
    }

    //预约视图 前台修改保存预约
    @RequestMapping(value = "/updateReservation", method = RequestMethod.POST)
    @ResponseBody
    public int updateReservation(String customerPhone, String projectData, String endTimeValue, String treatmentUnit,String fieldTc, String doctor, String remarks, String reservationsId,
                                 String startTimeValue, String customerId,String abbreviation,String outpatientName,String userName,String userId) throws Exception {
        return customerService.updateReservation(customerPhone, projectData, endTimeValue, treatmentUnit,
                fieldTc, doctor, remarks, reservationsId, startTimeValue, customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击确认 
    @RequestMapping(value = "/sureAppointment", method = RequestMethod.POST)
    @ResponseBody
    public int sureAppointment(String customerId,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.sureAppointment(customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击取消确认
    @RequestMapping(value = "/no_sureAppointment", method = RequestMethod.POST)
    @ResponseBody
    public int no_sureAppointment(String customerId,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.no_sureAppointment(customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击取消预约
    @RequestMapping(value = "/cancelAppointmentok", method = RequestMethod.POST)
    @ResponseBody
    public int cancelAppointmentok(String customerId, String remarks,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.cancelAppointmentok(customerId,remarks,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击挂号
    @RequestMapping(value = "/regresses", method = RequestMethod.POST)
    @ResponseBody
    public int regresses(String customerId,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.regresses(customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击开始治疗
    @RequestMapping(value = "/startTreatment", method = RequestMethod.POST)
    @ResponseBody
    public int startTreatment(String customerId,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.startTreatment(customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击完成治疗
    @RequestMapping(value = "/completionTreatment", method = RequestMethod.POST)
    @ResponseBody
    public int completionTreatment(String customerId,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.completionTreatment(customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击离开
    @RequestMapping(value = "/alreadyLeave", method = RequestMethod.POST)
    @ResponseBody
    public int alreadyLeave(String customerId,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.alreadyLeave(customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 点击回退 
    @RequestMapping(value = "/fallbackAction", method = RequestMethod.POST)
    @ResponseBody
    public int fallbackAction(String customerId, String arrivalStatus,String abbreviation,String outpatientName,String userName,String userId) {
        return customerService.fallbackAction(customerId,arrivalStatus,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 得到预约人数
    @RequestMapping(value = "/getMakeNumer", method = RequestMethod.POST)
    @ResponseBody
    public List<CustomerInfo> getMakeNumer(String reservationsId, String abbreviation) {
        return customerService.getMakeNumer(reservationsId,abbreviation);
    }

    //查询客户信息
    @RequestMapping(value = "/getCustomerByStore", method = RequestMethod.POST)
    @ResponseBody
    public List<CustomerInfo> getCustomerByStore(String reach, String pageStart, String pageSize,String abbreviation) {
        return customerService.getCustomerByStore(reach,pageStart,pageSize,abbreviation);
    }

    //验证
    @RequestMapping(value = "/getdcsByReservationId", method = RequestMethod.POST)
    @ResponseBody
    public int getdcsByReservationId(String id) throws Exception {
        return customerService.getdcsByReservationId(id);
    }

    //预约视图 新建临时患者预约
    @RequestMapping(value = "/temporaryCustomer", method = RequestMethod.POST)
    @ResponseBody
    public String temporaryCustomer(String customerName,String customerAge,String customerPhone,String customerSex,String phoneSharShip,String abbreviation) throws Exception {
        return customerService.temporaryCustomer(customerName,customerAge,customerPhone,customerSex,phoneSharShip,abbreviation);
    }

    //预约视图 新建临时患者保存预约
    @RequestMapping(value = "/addTemporaryCustomer", method = RequestMethod.POST)
    @ResponseBody
    public int addTemporaryCustomer( String projectData, String duration, String treatmentUnit,String fieldTc, String doctor, String remarks,
                                     String startTimeValue, String customerId,String abbreviation,String outpatientName,String userName,String userId) throws Exception {
        return customerService.addTemporaryCustomer(projectData,duration,treatmentUnit,fieldTc,doctor,remarks,
                startTimeValue,customerId,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 临时患者点挂号补充详细信息提交
    @RequestMapping(value = "/addTemporaryCustomerOK/{abbreviation}/{userName}/{outpatientName}/{userId}", method = RequestMethod.POST)
    @ResponseBody
    public int addTemporaryCustomerOK(@Valid CustomerInfo info,@PathVariable String abbreviation,@PathVariable String userName,@PathVariable String outpatientName,@PathVariable String userId) throws Exception {
        return customerService.addTemporaryCustomerOK(info,abbreviation,outpatientName,userName,userId);
    }

    //预约视图 市场新建临时患者预约
    @RequestMapping(value = "/addCustomerMarket", method = RequestMethod.POST)
    @ResponseBody
    public int addCustomerMarket(String customerPhone, String projectData, String duration, String treatmentUnit,String fieldTc, String doctor, String remarks, String reservationsId,
                                 String startTimeValue,String abbreviation,String outpatientName,String userName,String userId) throws Exception {
        return customerService.addCustomerMarket(customerPhone,projectData, duration, treatmentUnit, fieldTc, doctor,remarks, reservationsId,startTimeValue,
                abbreviation, outpatientName, userName, userId);
    }

    //预约视图 预约患者搜索
    @RequestMapping(value = "/getCustomerByReachNew", method = RequestMethod.POST)
    @ResponseBody
    public StoreRecordsInfo getCustomerByReachNew(String reach, String pageStart, String pageSize, String abbreviation) {
        return customerService.getCustomerByReachNew(reach,pageStart,pageSize,abbreviation);
    }

    //预约视图 点击搜索患者，查询详细信息返回，到店的
    @RequestMapping(value = "/getCustomerByReservationsId", method = RequestMethod.POST)
    @ResponseBody
    public CustomerInfo getCustomerByReservationsId(String reservationsId,String abbreviation) {
        return customerService.getCustomerByReservationsId(reservationsId,abbreviation);
    }

    //预约视图 点击搜索患者，查询详细信息返回，市场的
    @RequestMapping(value = "/getReservationsByReservationsId", method = RequestMethod.POST)
    @ResponseBody
    public CustomerInfo getReservationsByReservationsId(String reservationsId) {
        return customerService.getReservationsByReservationsId(reservationsId);
    }

    //前台上方搜索框搜索患者
    @RequestMapping(value = "/getCustomerByReach", method = RequestMethod.POST)
    @ResponseBody
    public StoreRecordsInfo getCustomerByReach(String reach, String pageStart, String pageSize,String abbreviation) {
        return customerService.getCustomerByReach(reach,pageStart,pageSize,abbreviation);
    }

}